//统一管理用户相关接口
import request from '@/utils/request'
import type { loginForm, loginRes, userInfoRes } from './type'
//用户相关接口枚举
enum API {
  LOGIN_URL = '/user/login',
  USERINFO_URL = '/user/info',
}
//暴露请求函数
//登录接口方法
export const reqLogin = (data: loginForm) => {
  return request.post<any, loginRes>(API.LOGIN_URL, data)
}
//用户信息方法
export const reqGetUserInfo = () => {
  return request.get<any, userInfoRes>(API.USERINFO_URL)
}
